package com.wanmait.wanmarecruit.webController;

import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

@ControllerAdvice
public class WebCommonControllerAdvice {

//    @InitBinder
//    public void initBinder(WebDataBinder binder){
//        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
//        binder.registerCustomEditor(Date.class,new CustomDateEditor(dateFormat,true));
//    }
}
